package com.cheng.io.buffer;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class BufferedReaderTest01 {
    public static void main(String[] args) {
        try (
                BufferedReader bufferedReader = new BufferedReader(new FileReader("io/resources/特性1.txt"));
        ) {
            String readLine;
            while ((readLine = bufferedReader.readLine()) != null){
                // bufferedReader.readLine() 按行读取数据，每次读一行但是换行符不会读取，需要手动换行
                System.out.println(readLine);
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
